package statefulset

import (
	"kms-backend/controllers/statefulset"

	"github.com/gin-gonic/gin"
)

// 新增
func create(statefulsetGroup *gin.RouterGroup) {
	statefulsetGroup.POST("/create", statefulset.Create)
}

// 更新
func update(statefulsetGroup *gin.RouterGroup) {
	statefulsetGroup.POST("/update", statefulset.Update)
}

func detail(statefulsetGroup *gin.RouterGroup) {
	statefulsetGroup.GET("/detail", statefulset.Detail)
}

func list(statefulsetGroup *gin.RouterGroup) {
	statefulsetGroup.GET("/list", statefulset.List)
}

func delete(statefulsetGroup *gin.RouterGroup) {
	statefulsetGroup.POST("/delete", statefulset.Delete)
}

func RegisterSubRouter(g *gin.RouterGroup) {
	// 配置路由策略
	statefulsetGroup := g.Group("/statefulset")
	create(statefulsetGroup)
	update(statefulsetGroup)
	detail(statefulsetGroup)
	list(statefulsetGroup)
	delete(statefulsetGroup)

}
